package com.Telien.app.request.object;
import java.util.Date;
import java.util.UUID;

import de.micromata.opengis.kml.v_2_2_0.Coordinate;

public class DriverRequest extends Request {
	String kmlPath;
	Coordinate startCord;
	Coordinate endCord; 
	int startMileRadius;
	int endMileRadius;
	int passanagerCount;
	Date startTime;
	Date endTime;
	String userUUID;
	String id;


	DriverRequest(String userUUID,String kmlPath,
			Coordinate startCord,Coordinate endCord,int searchMileRadius, 
			int endMileRadius,int passanagerCount,Date startTime,Date endTime){
		requestUUID=UUID.randomUUID().toString();;
		this.kmlPath=kmlPath;
		this.startCord=startCord;
		this.endCord=endCord; 
		this.userUUID=userUUID;
		this.startMileRadius=searchMileRadius;
		this.endMileRadius=endMileRadius;
		this.passanagerCount=passanagerCount;
		this.startTime=startTime;
		this.endTime=endTime;
		this.activeFlag=true;	
	}
	
	 public DriverRequest(int id,int userid,String startLat,
			 String startLong,String endLat,String endLong,
			 int searchSR,int serachER,int passCnt,Date startDate,Date endDate){
		 requestUUID = Integer.toString(id);
		 userUUID = Integer.toString(userid);
		 Coordinate sCord = new Coordinate(Float.valueOf(startLat.trim()),Float.valueOf(startLong.trim()));
		 Coordinate eCord = new Coordinate(Float.valueOf(endLat.trim()),Float.valueOf(endLong.trim()));
		 startCord = sCord;
		 endCord = eCord;
		 startMileRadius=searchSR;
		 endMileRadius=serachER;
		 passanagerCount=passCnt;
		 startTime= startDate;
		 endTime= endDate;
	 }
	 
	 //TDD Constructor 
	 public DriverRequest(Coordinate coord1, Coordinate coord2,Date startDate,Date endDate){
		 startCord = coord1;
		 endCord = coord2;
		 startTime= startDate;
		 endTime= endDate;
	 }
	
	public DriverRequest(String userUUID,String kmlPath,int searchMileRadius, 
			int endMileRadius,int passanagerCount,Date startTime,Date endTime){
		requestUUID=UUID.randomUUID().toString();;
		this.kmlPath=kmlPath;
		this.userUUID=userUUID;
		this.startMileRadius=searchMileRadius;
		this.endMileRadius=endMileRadius;
		this.passanagerCount=passanagerCount;
		this.startTime=startTime;
		this.endTime=endTime;
		this.activeFlag=true;
	}
	
	public String toString(){
		return("[ "+startCord.toString()+" "+ endCord.toString()+" "+startTime+" "+endTime+" ]");
	}

	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}

	public String getRequestUUID() {
		return requestUUID;
	}


	public void setRequestUUID(String requestUUID) {
		this.requestUUID = requestUUID;
	}


	public String getKmlPath() {
		return kmlPath;
	}


	public void setKmlPath(String kmlPath) {
		this.kmlPath = kmlPath;
	}


	public Coordinate getStartCord() {
		return startCord;
	}


	public void setStartCord(Coordinate startCord) {
		this.startCord = startCord;
	}


	public Coordinate getEndCord() {
		return endCord;
	}


	public void setEndCord(Coordinate endCord) {
		this.endCord = endCord;
	}


	public String getUserUUID() {
		return userUUID;
	}


	public void setUserUUID(String userUUID) {
		this.userUUID = userUUID;
	}


	public int getStartMileRadius() {
		return startMileRadius;
	}


	public void setStartMileRadius(int startMileRadius) {
		this.startMileRadius = startMileRadius;
	}


	public int getEndMileRadius() {
		return endMileRadius;
	}


	public void setEndMileRadius(int endMileRadius) {
		this.endMileRadius = endMileRadius;
	}


	public int getPassanagerCount() {
		return passanagerCount;
	}


	public void setPassanagerCount(int passanagerCount) {
		this.passanagerCount = passanagerCount;
	}


	public Date getStartTime() {
		return startTime;
	}


	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}


	public Date getEndTime() {
		return endTime;
	}


	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}


	public boolean isActiveFlag() {
		return activeFlag;
	}


	public void setActiveFlag(boolean activeFlag) {
		this.activeFlag = activeFlag;
	}
	
}
